package com.ruoyi.asset.park.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.asset.park.domain.ParkMaintenance;
import com.ruoyi.asset.park.domain.bo.*;
import com.ruoyi.asset.park.domain.vo.ParkMaintenanceVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 道路绿化管养任务完成进度Mapper接口
 *
 * @author cc
 * @date 2023-08-29
 */
public interface ParkMaintenanceMapper extends BaseMapperPlus<ParkMaintenanceMapper, ParkMaintenance, ParkMaintenanceVo> {
    /**
     * 删除管养范围
     */
    int logicDeleteMaintenanceScope(@Param("idsSet") Set<Long> idsSet);

    /**
     * 查询管养范围
     */
    Page<ParkMaintenanceVo> selectMaintenanceScopeWithPage(IPage<ParkMaintenanceVo> page, @Param("searchBo") ParkMaintenanceSearchBo searchBo);

    /**
     * 查询管养范围
     */
    List<ParkMaintenanceVo> exportMaintenanceScope(ParkMaintenanceSearchBo searchBo);

    /**
     * 查询公园数量和面积
     */
    Double getParkArea();

    Integer getParkCount();

    /**
     * 统计公园管养
     */
    List<StatisticianParkByRegion> statForParkByRegion();

    Integer getParkNameCommunityCount(@Param("community")String community);

    List<ParkTypeBo> getParkTypeCommunityCount(@Param("community")String community);

    Integer selectParkNumByCommunity(@Param("date") String date,@Param("community")String community);

    Double selectParkAreaByCommunity(@Param("date") String date, @Param("community")String community);

    List<ParkTypeBo> selectByCommunityAndDateCount(@Param("community") String community, @Param("date")String date);
}
